<template>
	<view class="form1">
		<base-form :labelPosition="'top'" v-model="formModel" :labelWidth="100" :formList="formList" :btnMessage="btnMessage" @submit="submit" v-show="isShow">
			<view slot="testSlot">
				<view class="signature" @click="goSign">
					<u-icon name="edit-pen" size="48"></u-icon>
					<text style="color: #4c4c4c">分析人签字</text>
				</view>
			</view>
		</base-form>
    <Autograph v-show="!isShow" @fj="fileUrls" @ISHOW="show"></Autograph>
	</view>
</template>

<script>
	import {
		workHeaderAPI,
    auditorsAPI
	} from '@/api/public.js'
	import{ flammableGas } from '@/utils/address.js'
  import Autograph from '../../../autograph/autograph'
	export default {
    components: {
      Autograph
    },
    props:['pageTyep'],
		data() {
			return {
			  isShow:true,
        fileUrl:'',
				btnMessage: {
					state: false,
					cancels: '上一步',
					submit: '下一步',
				},
				formModel: {
					name: "",
					userPicker: "",
					datetime: "",
					picker: "",
				},
				formList: flammableGas
			}
		},
		methods: {
      fileUrls(val){
        this.fileUrl = val
      },
      show(val){
        this.isShow = val
      },
      goSign(){
        this.isShow =false
      },
      submit() {
        this.$emit("fzr", {step:5,fileUrl:this.fileUrl,value:this.formModel})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.form1 {
		background: #FFF;

		.signature {
			font-size: 24rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			margin-top: 60rpx;
			width: 180rpx;
			height: 180rpx;
			background: #F6F6F6;
		}
	}
</style>
